package com.atguigu.controller;

import com.atguigu.domain.CrmBanner;
import com.atguigu.service.CrmBannerService;
import com.atguigu.utils.R;
import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.cache.annotation.Cacheable;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/educms/bannerfront")
@CrossOrigin
public class BannerFrontController {
    @Autowired
    private CrmBannerService crmBannerService;


    @GetMapping("getAllBanner")
    public R getAllBanner(){

        List<CrmBanner> bannerList = crmBannerService.selectAllBanner();
        return R.ok().data("list",bannerList);
    }
}
